package com.cui.demoshiro.service.function.impl;

import com.cui.demoshiro.dao.function.FunctionDao;
import com.cui.demoshiro.pojo.Function;
import com.cui.demoshiro.service.function.FunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FunctionServiceImpl implements FunctionService {

    @Autowired
    private FunctionDao functionDao ;

    @Override
    public List<Function> getFirstFunctionList() {
        return functionDao.getFirstFunctionList();
    }

    @Override
    public List<Function> getChildrenFunctionList(int parentId) {
        return functionDao.getChildrenFunctionList(parentId);
    }

    @Override
    public Function getFunctionInfo(int id) {
        return functionDao.getFunctionInfo(id);
    }

    @Override
    public List<Function> getFunctionListByUser(int uid) {
        return functionDao.getFunctionListByUser(uid);
    }

    @Override
    public List<Function> getFunctionListByRole(int rid) {
        return functionDao.getFunctionListByRole(rid);
    }
}
